<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>用户信息</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f0f0f0;
        }

        .container {
            width: 50%;
            margin: 0 auto;
            background-color: #fff;
            padding: 20px;
            border-radius: 5px;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        }

        h2 {
            text-align: center;
            color: #333;
        }

        ul {
            list-style-type: none;
            padding: 0;
        }

        li {
            margin: 20px;
        }

        p {
            margin: 0;
        }

        button {
            display: block;
            width: 100%;
            padding: 10px;
            margin-top: 20px;
            background-color: #007bff;
            color: #fff;
            border: none;
            border-radius: 5px;
            cursor: pointer;
        }

        button:hover {
            background-color: #0056b3;
        }
    </style>
</head>
<body>
<div class="container" sec:authorize="isAuthenticated()">

    <h2>用户信息</h2>

    <ul>
        <li><p>用户名: <span sec:authentication="name"> </span></p></li>
        <li><p>用户权限: <span sec:authentication="principal.authorities"> </span></p></li>

    </ul>

    <div>
        <a th:href="@{/toUpdate}">
            <button type="submit">修改用户信息</button>
        </a>
        <a th:href="@{/deleteUser}">
            <button type="submit">注销用户</button>
        </a>
        <a  type="submit" th:href="@{/}"  class="navbar-logo">
            <button type="submit">返回</button>
        </a>
    </div>


</div>

</body>
</html>